<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/reset.css">
    <style>
        .nav {
            height: 50px;
            background-color: #f00;
            /* 没有脱离文档流的，他是正常占位置的   仅仅只是给决定定位提供参照 */
            position: relative;
        }

        .nav li {
            float: left;
            width: 100px;
            text-align: center;
            line-height: 50px;
        }


        .hide {
            width: 100%;
            height: 200px;
            background-color: #ff0;

            position: absolute;
            left: 0;

            height: 0;
            overflow: hidden;
            transition: .3s;

            /* 定位的辅助属性 */
            z-index: 1;
        }

        .nav li:hover .hide {
            height: 200px;
        }


        .w {
            width: 1226px;
            margin: auto;
        }

        .banner img {
            width: 100%;
        }

        .banner .w {
            position: relative;
        }

        .menu {
            width: 234px;
            height: 460px;
            background-color: rgba(0, 0, 0, 0.5);

            /* 参照物：具有定位的元素都可以作为参照物 */
            position: absolute;
            top: 0;

            /* position: relative; */
        }

        .menu a {
            display: block;
            padding-left: 20px;
            line-height: 42px;
        }

        .menu a:hover {
            background-color: orange;
        }


        .hide-menu {
            width: 992px;
            height: 460px;
            background-color: #f00;

            position: absolute;
            top: 0;
            left: 234px;

            display: none;
        }

        .menu li:hover .hide-menu {
            display: block;
        }
    </style>
</head>

<body>

    <div class="nav">
        <ul>
            <li>
                <a href="">首页</a>
                <div class="hide">
                    <div class="w"></div>
                </div>
            </li>
            <li>
                <a href="">首页</a>
                <div class="hide"></div>
            </li>
            <li>
                <a href="">首页</a>
                <!-- <div class="hide"></div> -->
            </li>
            <li>
                <a href="">首页</a>
                <!-- <div class="hide"></div> -->
            </li>
        </ul>
    </div>


    <div class="banner">
        <div class="w">
            <img src="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/34ee703098b12753b2130a3462ca33ac.jpg?thumb=1&w=1839&h=690&f=webp&q=90"
                alt="">

            <ul class="menu">
                <li>
                    <a href="">首页 <i class="iconfont icon-xxx"></i> </a>
                    <div class="hide-menu"></div>
                </li>
                <li>
                    <a href="">首页</a>
                </li>
                <li>
                    <a href="">首页</a>
                </li>
                <li>
                    <a href="">首页</a>
                </li>

                <li>
                    <a href="">首页</a>
                </li>
            </ul>
        </div>
    </div>
</body>

</html>